<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        let temp = null

        function Person(name, age, gender, height) {
            this.name = name;
            this.age = age;
            this.gender = gender;
            this.height = height;
            this.sayHi = function () { }
            // console.log(this)
            temp = this
        }
        var gd = new Person('狗蛋', 18, '男', 188)
        console.log(gd === temp)
        /*
            构造函数的this 指向 被 new 的实例对象
        */
    </script>
</body>

</html>